//! Header for the Device class
#ifndef DEVICE_H
#define DEVICE_H

#include "IDevice.h"

//! The class Device represents the base class of all devices the
//! RemoteControl can handle
/*!
	This class is able to output the state of a Device
	and can return the current state. The on and of state
	can also be set and a device can be switched on and off.
	\class Device
	\author Andreas Lehner
	\date 25.11.2012
*/

enum OnOffState {eOn, eOff};

class Device : public IDevice {
public:
	virtual void Info(std::ostream &stream){}
	//! Function to switch on a device
	/*!
		This function changes the on/off state of
		a device to "on".
	*/
	virtual void SwitchOn();
	//! Function to switch off a device
	/*!
		This function changes the on/off state of
		a device to "off".
	*/
	virtual void SwitchOff();
	//! Get the on/off state of a device
	/*!
		This function returns the current state
		of a device.
		\return OnOffState The OnOffState of the device
	*/
	virtual OnOffState getOnOffState() const;
	//! Set the on/off state of a device
	/*!
		The on/off state off a device is set.
	*/
	virtual void setOnOffState(OnOffState state);
protected:
	/** on/off state of a device */
	OnOffState mOnOffState;
};

#endif